

<form action="" method="post" id="overlay_form"  style="display:none" >

<h1>update <?php echo $entity;  ?></h1>


</br></br>
<fieldset>
     <legend>Personal Info</legend>
        
         
          <label for="email">First name:</label>
            <input type="text" name="firstName" id="firstName" size="32" maxlength="128" value="<?php if (isset ($firstName)) echo $firstName;?>" />
            
             <label for="email">last name:</label>
            <input type="text" name="lastName" id="lastName" size="32" maxlength="128"  />
            
             <label for="email">middle name:</label>
            <input type="text" name="middleName" id="middleName" size="32" maxlength="128" />
         
         
         
        
        
        
         <label for="gender">Gender:</label>
            
             <select size="1" name="gender" id="gender">
                    <option value="male">Male</option>
                    <option value="female">Female</option>
                    
             </select>
            
        
        
         <label for="dobMonth">Date of Birth:</label>
            
             <select size="1" name="dobMonth" id="dobMonth">
                 <option value="Jan">Jan</option>
                    <option value="Feb">Feb</option>
                    <option value="Mar">Mar</option>
                    <option value="Apr">Apr</option>
                    <option value="May">May</option>
                    <option value="Jun">Jun</option>
                    <option value="Jul">Jul</option>
                    <option value="Aug">Aug</option>
                    <option value="Sep">Sep</option>
                    <option value="Oct">Oct</option>
                    <option value="Nov">Nov</option>
                    <option value="Dec">Dec</option>
                </select>
                
                
                <select size="1" name="dobDay" id="dobDay">
                 <?php 
				  	for ($i=01;$i<31;$i++)
					echo '<option value="'.$i.'">'.$i.'</option>';
					?>
                </select>
                <select size="1" name="dobYear" id="dobYear">
                   <?php 
				  	for ($i=2013;$i>1900;$i--)
					echo '<option value="'.$i.'">'.$i.'</option>';
					?>
                 
                 
                 
                </select>
            
        
    </fieldset>




<fieldset>
     <legend>Contact Details</legend>
        
         
          <label for="homeNumber">home number</label>
            <input type="text" name="homeNumber" id="homeNumber" size="32" maxlength="128" />
            
             <label for="workNumber">work Number:</label>
            <input type="text" name="workNumber" id="workNumber" size="32" maxlength="128" />
            
             <label for="mobileNumber">mobile Number:</label>
            <input type="text" name="mobileNumber" id="mobileNumber" size="32" maxlength="128" />
         
         
          <label for="email">Email Address:</label>
            <input type="text" name="email" id="email" size="32" maxlength="128" />
        

  </fieldset>


<fieldset>
     <legend>Address Details</legend>
        
         
          <label for="firstLineAddress">first Line Address</label>
            <input type="text" name="firstLineAddress" id="firstLineAddress" size="32" maxlength="128" />
            
             <label for="secondLineAddress">second Line Address:</label>
            <input type="text" name="secondLineAddress" id="secondLineAddress" size="32" maxlength="128" />
            
             <label for="city">city:</label>
            <input type="text" name="city" id="city" size="32" maxlength="128" />
         
         
          <label for="postCode">post Code:</label>
            <input type="text" name="postCode" id="postCode" size="32" maxlength="128" />
          <label for="country">country:</label>
            <input type="text" name="country" id="country" size="32" maxlength="128" />
        

  </fieldset>
 <fieldset>
     <legend>Other Details</legend>
        
         
          <label for="position">position</label>
            <input type="text" name="position" id="position" size="32" maxlength="128" />
            
             
             <label for="position">marital status</label>
         		<select size="1" name="maritalstatus" id="maritalstatus">
                <option value="single">single</option>
                 <option value="married">married</option>
                    
             </select>

  </fieldset>

  <fieldset class="action">
     <input type="submit" name="submit" id="submit" value="Submit" />
    
    <a href="#" id="close" >Close</a>
    </fieldset>
</form>


<script type="text/javascript">
$('#submit').click(function() {
	
	/*var name = $('#name').val();
	
	if (!name || name == 'Name') {
		alert('Please enter your name');
		return false;
	}
	*/
	
	var form_data = {
		firstName: $('#firstName').val(),
		email: $('#email').val(),
		lastName: $('#lastName').val(),
		//ajax: '1'		
	};
	
	$.ajax({
		
		url: '<?php echo base_url().'index.php/employee/update_employee';?>',
		
		type: 'POST',
		data: form_data,
		success: function() {
			window.location.reload();
			//$('#main_content').html(msg);
		}
	});
	$("#overlay_form").fadeOut(500);
	return false;
});
	
	
</script>